# -*- coding: UTF-8 -*-

from .utils import *
from .utils import __parse_args__


def main():
  # print("main invoked")
  params = ' '.join(sys.argv[1:])
  # print(params)
  # params = "-c dir -p dir --sdk gavialcore \
  # --name plugin1 --version 1.2.1 --sdkVersion 2.0.0 \
  # --lang python --jobType spark --pkgType ETL"
  pluginCtx, parser = __parse_args__(params)
  # parser.print_usage(sys.stdout)
  if pluginCtx.get_plugin_dir() is not None:
    package_plugin(pluginCtx.get_plugin_dir())
  else:
    create_plugin(pluginCtx)
